<?php
namespace app\index\controller;

use think\Controller;
use think\Db;

class Base extends Controller
{
  public function initialize()
  {
    //出国百科
    $cgbk = Db::name('article')->where('cate_id','=',3)->limit(6)->select();
    $this->assign('cgbk',$cgbk);
    //新闻资讯
    $xwzx = Db::name('article')->where('cate_id','=',4)->limit(6)->select();
    $this->assign('xwzx',$xwzx);
    //导航
    $add = Db::name('address')->where('type','=',2)->select();
    $this->assign('add',$add);
    // dump($add); die;
  }

}
?>